<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html">
  <h:head>
    <title>Facelet Title</title>
  </h:head>
  <h:body>
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:c="http://java.sun.com/jsp/jstl/core"
                    xmlns:ace="http://www.icefaces.org/icefaces/components"
                    xmlns:icecore="http://www.icefaces.org/icefaces/core"
                    xmlns:ui="http://java.sun.com/jsf/facelets"
                    template="layout.xhtml">
      <ui:define name="title">My messages / Awesome Dates</ui:define>
      <ui:define name="content">
        <div id="textEntry">
          <h:form>
            <ace:messages/>
            <ace:textEntry label="To: " labelPosition="left" value="#{reply.mbReader.sendToUsername}" disabled="true"/><br/>
            <h:inputHidden value="#{reply.mbReader.sendToUsername}"/>
            <ace:textEntry label="Subject: " labelPosition="left" value="#{reply.message.subject}" validatorMessage="Subject must be maximum 45 characters." >
              <f:validateLength maximum="25"/>
            </ace:textEntry><br/>
            <h:inputTextarea cols="50" rows="10" value="#{reply.message.messageText}" validatorMessage="Text must be maximum 1500 characters.">
              <f:validateLength maximum="1500"/>
            </h:inputTextarea><br/>


            <h:commandButton value="Send Message" action="#{reply.insertMessage()}"/>
            <h:commandButton value="Cancel" action="myMessages"/>
            <h:inputHidden value="#{reply.mbUser.user.userID}"/>

          </h:form>
        </div>

      </ui:define>
    </ui:composition>
  </h:body>
</html>

